package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by y on 2018/6/28.
 */
@Entity
@Table(name = "T_DVC_LOGISTICS_CHANGE", schema = "oa", catalog = "")
public class DevicelogisticsEntity extends BaseEntity {
    private String sampleId;
    private String trafficDestination;
    private String trafficStarting;
    private String transportCompany;
    private String contacts;
    private String telephone;
    private String drayLicense;
    private String driverName;
    private String driverTel;
    private BigDecimal specialFee;
    private BigDecimal deductionFee;
    private String deductionRemark;
    private String reason;
    private Date createTime;
    private Date updateTime;
    private String transportStartTime;
    private String transportEndTime;
    public String getSampleId() {
        return sampleId;
    }

    public void setSampleId(String sampleId) {
        this.sampleId = sampleId;
    }

    public String getTrafficDestination() {
        return trafficDestination;
    }

    public void setTrafficDestination(String trafficDestination) {
        this.trafficDestination = trafficDestination;
    }

    public String getTrafficStarting() {
        return trafficStarting;
    }

    public void setTrafficStarting(String trafficStarting) {
        this.trafficStarting = trafficStarting;
    }

    public String getTransportCompany() {
        return transportCompany;
    }

    public void setTransportCompany(String transportCompany) {
        this.transportCompany = transportCompany;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getDrayLicense() {
        return drayLicense;
    }

    public void setDrayLicense(String drayLicense) {
        this.drayLicense = drayLicense;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverTel() {
        return driverTel;
    }

    public void setDriverTel(String driverTel) {
        this.driverTel = driverTel;
    }

    public BigDecimal getSpecialFee() {
        return specialFee;
    }

    public void setSpecialFee(BigDecimal specialFee) {
        this.specialFee = specialFee;
    }

    public BigDecimal getDeductionFee() {
        return deductionFee;
    }

    public void setDeductionFee(BigDecimal deductionFee) {
        this.deductionFee = deductionFee;
    }

    public String getDeductionRemark() {
        return deductionRemark;
    }

    public void setDeductionRemark(String deductionRemark) {
        this.deductionRemark = deductionRemark;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getTransportStartTime() {
        return transportStartTime;
    }

    public void setTransportStartTime(String transportStartTime) {
        this.transportStartTime = transportStartTime;
    }

    public String getTransportEndTime() {
        return transportEndTime;
    }

    public void setTransportEndTime(String transportEndTime) {
        this.transportEndTime = transportEndTime;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("SAMPLE_ID",this.getSampleId());
        obj.put("TRAFFIC_STARTING", this.getTrafficStarting());
        obj.put("TRAFFIC_DESTINATION", this.getTrafficDestination());
        obj.put("TRANSPORT_COMPANY", this.getTransportCompany());
        obj.put("CONTACTS", this.getContacts());
        obj.put("TELEPHONE", this.getTelephone());
        obj.put("DRAY_LICENSE", this.getDrayLicense());
        obj.put("DRIVER_NAME", this.getDriverName());
        obj.put("DRIVER_TEL", this.getDriverTel());
        obj.put("SPECIAL_FEE", this.getSpecialFee());
        obj.put("DEDUCTION_FEE", this.getDeductionFee());
        obj.put("DEDUCTION_REMARK", this.getDeductionRemark());
        obj.put("REASEON", this.getReason());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("UPDATE_TIME", getUpdateTime());
        obj.put("TRANSPORT_START_TIME", this.getTransportStartTime());
        obj.put("TRANSPORT_END_TIME", this.getTransportEndTime());
        return obj;
    }
    @Override
    public String getTableName() {
        return "T_DVC_LOGISTICS_CHANGE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("SAMPLE_ID","sampleId");
        obj.put("TRAFFIC_STARTING", "trafficStarting");
        obj.put("TRAFFIC_DESTINATION", "trafficDestination");
        obj.put("TRANSPORT_COMPANY","transportCompany");
        obj.put("CONTACTS", "contacts");
        obj.put("TELEPHONE", "telephone");
        obj.put("DRAY_LICENSE", "drayLicense");
        obj.put("DRIVER_NAME", "driverName");
        obj.put("DRIVER_TEL", "driverTel");
        obj.put("SPECIAL_FEE", "specialFee");
        obj.put("DEDUCTION_FEE", "deductionFee");
        obj.put("DEDUCTION_REMARK", "deductionRemark");
        obj.put("REASEON", "reason");
        obj.put("CREATE_TIME", "createTime");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("TRANSPORT_START_TIME", "transportStartTime");
        obj.put("TRANSPORT_END_TIME", "transportEndTime");
        return obj;
    }
}
